Skip to content

Comments

fix(devtools): add zeditor option for Zed on Arch Linux#932

Open
oritwoen wants to merge 1 commit intonuxt:mainfrom
oritwoen:fix/zed-zeditor-option
Open

fix(devtools): add zeditor option for Zed on Arch Linux#932
oritwoen wants to merge 1 commit intonuxt:mainfrom
oritwoen:fix/zed-zeditor-option

Conversation

@oritwoen
Copy link

@oritwoen oritwoen commented Feb 18, 2026

Summary

  • add a Zed (zeditor) option in DevTools settings for environments where the Zed binary is exposed as zeditor
  • keep the existing Zed (zed) option unchanged to avoid behavior changes on other platforms
  • keep implementation simple by handling this as an explicit editor choice in settings

Why this is needed

On some Linux distributions (notably Arch Linux), the Zed package exposes the executable as zeditor instead of zed.

Before this change, users selecting Zed in DevTools would fail to open files from "Open in editor" despite having Zed installed, because DevTools passed zed to launch-editor.

Adding an explicit zeditor option:

  • fixes the workflow for Arch users,
  • avoids platform-specific server-side fallback logic,
  • preserves current behavior for everyone already using zed.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

📝 Walkthrough

Walkthrough

A single new editor option "Zed (zeditor)" has been added to the editorOptions list in the DevTools Settings page configuration. This expands the available editor choices without modifying any existing logic or behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(devtools): add zeditor option for Zed on Arch Linux' accurately describes the main change - adding a new editor option for Zed on Arch Linux where it's exposed as 'zeditor'.
Description check ✅ Passed The description is well-related to the changeset, providing context on why the change is needed (Zed binary exposed as 'zeditor' on Arch Linux) and explaining the implementation approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/devtools/client/pages/settings.vue (1)

33-44: ⚠️ Potential issue | 🔴 Critical

Backend does not support zeditor — this change will fail at runtime.

While zeditor is the correct binary name used by Arch Linux and other distributions, the launch-editor npm package (v2.12.0, latest as of Oct 2025) has built-in support only for zed, not zeditor. The backend code at packages/devtools/src/server-rpc/general.ts:224 directly passes the editor value to launch-editor without additional handling.

Selecting this option will fail to open files because launch-editor will not recognize zeditor. You need to either:

  1. Map zeditor to the built-in zed key in the backend (though this won't work on systems where the binary is named zeditor), or
  2. Add backend logic to handle zeditor via custom LAUNCH_EDITOR environment variable support
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/devtools/client/pages/settings.vue` around lines 33 - 44, The editor
option "Zed (zeditor)" in the editorOptions array will send the value 'zeditor'
to launch-editor which does not recognize it; update the UI or backend so
selecting that option works: either change the frontend editorOptions entry to
use the supported value 'zed' instead of 'zeditor' (i.e. keep the label "Zed
(zeditor)" but set value 'zed'), or add a short mapping in the backend before
calling launch-editor (detect 'zeditor' and map it to 'zed' or consult
LAUNCH_EDITOR env var) where the code invokes launch-editor; reference
editorOptions and the backend call that forwards the editor value to
launch-editor and implement one of these fixes so the runtime value is
supported.
🧹 Nitpick comments (1)
packages/devtools/client/pages/settings.vue (1)

39-39: Consider also covering the zedit rename variant as a follow-up.

Zed's official Linux documentation notes that third-party packages commonly rename the binary to either zedit or zeditor to avoid conflicts. This PR correctly adds zeditor, but zedit is similarly a real binary name in some distributions and is not yet covered. A follow-up option ['Zed (zedit)', 'zedit'] could address that gap, though it's outside the stated scope of this PR.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/devtools/client/pages/settings.vue` at line 39, Add an additional
option for the alternative Zed binary name by inserting a new entry ['Zed
(zedit)', 'zedit'] alongside the existing ['Zed (zeditor)', 'zeditor'] in the
editors/options array in settings.vue so distributions that install the binary
as "zedit" are also recognized; locate the array that currently contains ['Zed
(zeditor)', 'zeditor'] and add the new tuple near it.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/devtools/client/pages/settings.vue`:
- Around line 33-44: The editor option "Zed (zeditor)" in the editorOptions
array will send the value 'zeditor' to launch-editor which does not recognize
it; update the UI or backend so selecting that option works: either change the
frontend editorOptions entry to use the supported value 'zed' instead of
'zeditor' (i.e. keep the label "Zed (zeditor)" but set value 'zed'), or add a
short mapping in the backend before calling launch-editor (detect 'zeditor' and
map it to 'zed' or consult LAUNCH_EDITOR env var) where the code invokes
launch-editor; reference editorOptions and the backend call that forwards the
editor value to launch-editor and implement one of these fixes so the runtime
value is supported.

---

Nitpick comments:
In `@packages/devtools/client/pages/settings.vue`:
- Line 39: Add an additional option for the alternative Zed binary name by
inserting a new entry ['Zed (zedit)', 'zedit'] alongside the existing ['Zed
(zeditor)', 'zeditor'] in the editors/options array in settings.vue so
distributions that install the binary as "zedit" are also recognized; locate the
array that currently contains ['Zed (zeditor)', 'zeditor'] and add the new tuple
near it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant